/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 22652
 * Date: 2024-04-01
 * Time: 21:45
 */
public class test_1 {
    public static int num=0;
    public static void main(String[] args) throws InterruptedException {
        Thread t0 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t1 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t2=new Thread(()->{
            System.out.println(num++);
        });
        Thread t3 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t4 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t5 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t6 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t7 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t8 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t9 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t10 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t11 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t12 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t13 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t14 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t15 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t16 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t17 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t18 =new Thread(()->{
            System.out.println(num++);
        });
        Thread t19 =new Thread(()->{
            System.out.println(num++);
        });
        t0.start();
        t1.start();
        t2.start();
        t3.start();
        t4.start();
        t5.start();
        t6.start();
        t7.start();
        t8.start();
        t9.start();
        t10.start();
        t11.start();
        t12.start();
        t13.start();
        t14.start();
        t15.start();
        t16.start();
        t17.start();
        t18.start();
        t19.start();
        t0.join();
        t1.join();
        t2.join();
        t3.join();
        t4.join();
        t5.join();
        t6.join();
        t7.join();
        t8.join();
        t9.join();
        t10.join();
        t11.join();
        t12.join();
        t13.join();
        t14.join();
        t15.join();
        t16.join();
        t17.join();
        t18.join();
        t19.join();
        System.out.println("ok");
    }
}
